package com.data.modules.online.config.executor;

import java.util.Comparator;

import com.data.modules.online.cgform.entity.OnlCgformField;

public class FieldNumComparator implements Comparator<OnlCgformField> {
    public int compare(OnlCgformField onlCgformField, OnlCgformField onlCgformField2) {
        if (onlCgformField == null || onlCgformField.getOrderNum() == null || onlCgformField2 == null || onlCgformField2.getOrderNum() == null) {
            return -1;
        }
        Integer orderNum = onlCgformField.getOrderNum();
        Integer orderNum2 = onlCgformField2.getOrderNum();
        if (orderNum.intValue() >= orderNum2.intValue()) {
            return orderNum == orderNum2 ? 0 : 1;
        }
        return -1;
    }
}
